#include "Color.h"

Color::Color()
        : r(0), g(0), b(0), a(255)
{
}

Color::Color(unsigned int r, unsigned int g, unsigned int b, unsigned int a)
        : r(r), g(g), b(b), a(a)
{
}

Color::~Color()
{
}

bool Color::operator==(const Color &other) const
{
    return (r == other.r) && (g == other.g) && (b == other.b) && (a == other.a);
}

Color Color::scale(double factor) const
{
    return Color(factor * r, factor * g, factor * b, a);
}

ColorGreen::ColorGreen()
        : Color(0, 255, 0)
{
}

ColorRed::ColorRed()
        : Color(255, 0, 0)
{
}

ColorBlue::ColorBlue()
        : Color(0, 0, 255)
{
}

ColorPurple::ColorPurple()
        : Color(255, 0, 255)
{
}

ColorBlack::ColorBlack()
        : Color(0, 0, 0)
{
}

ColorYellow::ColorYellow()
        : Color(255, 255, 0)
{
}
